
_side= side player;

_units=[];

lastTime=time-70;

_mySidePlayers=[];

while{!GameEnd} do {

	// update list of units only each 60 secs
	if(time - lastTime>15)then{
	
		_units=allUnits;
		lastTime=time;
		
		_mySidePlayers=[];
		
		{
		
			if((side _x) == _side) then{
				_mySidePlayers=_mySidePlayers+[_x];
			};
			
		}foreach _units;
		
	};

	// we show informations only if the agent open his map (to save cpu usage) 
	// [tank dont have map but a control map so dont restrict to visibleMap]
	
	//if((player!=TankPlayer))then{
		waitUntil{ visibleMap };
	//};	
	
	_markers=[];

	
	{ // forEach	
		
		
			//player sideChat format["TEST : %1 , %2",_x, _side countSide _units];
				
			_markerobj = createMarkerLocal[format["mt%1",_x],getPos _x];
			_markerobj setMarkerShapeLocal "ICON";
			_markerobj setMarkerTypeLocal "DOT";
			
			if((player!=_x))then{
				_markerobj setMarkerColorLocal "ColorGreenAlpha";
			}else{
				_markerobj setMarkerColorLocal "ColorOrange";
			};
			_markerobj setMarkerTextLocal format["%1",name _x];
			
			_markers=_markers+[_markerobj];		
		
		
	}forEach _mySidePlayers;
		
	sleep 0.7;
	
	{
		deleteMarkerLocal _x;
	}forEach _markers;

	
};